<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"

      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">

<head>
		<meta charset="utf-8" />
		<link rel="stylesheet" href="css/Load.css" />
		<link rel="stylesheet" href="css/reset.css" />
		<title>用户登陆</title>
	</head>
	<body>
		<div class="loading">
			<h1>后台管理系统</h1>
			<span>back-stage managemen</span>
			<div class="ShopLoad userload">
				<img src="img/Load_ico_03.png" />
				<input id="userName" type="text" placeholder="请输入账号" />
			</div>
			
			<div class="ShopLoad userpassword">
				<img src="img/Load_ico_06.png" />
				<input id="password" type="password" placeholder="请输入密码"/>
			</div>
			<div class="ShopLoad">
				<input id="yzm" class="InputCode" maxlength="4"  type="text"  placeholder="输入验证码"/>
				<div>
					<p id="code" class="showCode"></p>
				</div>
			</div>

			
			<button id="login" class="subtns">登陆</button>
		</div>

		<script type="text/javascript" src="jquery/jquery.min.js"></script>
		<script type="text/javascript" src="layui/layui.js"></script>
		<script type="text/javascript" src="js/login.js"></script>
		<script>
            function change(){
                code=$("#code");
                // 验证码组成库
                var arrays=new Array(
                    '2','3','4','5','6','7','8','9',
                    'a','b','c','d','e','f','g','h','j',
                    'k','m','n','p','q','r','s','t',
                    'u','v','w','x','y','z',
                    'A','B','C','D','E','F','G','H','J',
                    'K','M','N','P','Q','R','S','T',
                    'U','V','W','X','Y','Z'
                );
                codes='';// 重新初始化验证码
                for(var i = 0; i<4; i++){
                    // 随机获取一个数组的下标
                    var r = parseInt(Math.random()*arrays.length);
                    codes += arrays[r];
                }
                // 验证码添加到标签里
                code.text(codes);
            }
            change();
            code.click(change);
		</script>
	</body>
</html>
